For the segmentation of images with intensity inhomogeneity, a region-adaptive intensity fitting model combining global information was proposed. Firstly, the local and global terms were constructed based on local and global image information respectively. Secondly, an adaptive weight function was defined to indicate the deviation degree of the gray scale of a pixel neighborhood by utilizing the extreme difference level in the pixel neighborhood. Finally, the defined weighting function was used to assign weights to local and global terms adaptively to obtain the energy functional of the proposed model and the iterative equation of the model's level set function was deduced by the variational method. The experimental results show that the proposed model can segment various inhomogeneous images stably and accurately in comparison with Region-Scalable Fitting (RSF) model and Local and Global Intensity Fitting (LGIF) model, which is more robust in the position, size and shape of initial contour of evolution curve.
Biogeography-Based Optimization (BBO) algorithm updates habitats through migration and mutation continuously to find the optimal solution, and the migration model affects the performance of the algorithm significantly. In view of the problem of insufficient adaptability of the linear migration model used in the original BBO algorithm, three nonlinear migration models were proposed. These models are based on Logistic function, cubic polynomial function and hyperbolic tangent function respectively. Optimization experiments were carried out on 17 typical benchmark functions, and results show that the migration model based on hyperbolic tangent function performs better than the linear migration model of original BBO algorithm and cosine migration model with good performance of improved algorithm. Stability test shows that the migration model based on hyperbolic tangent function performs better than the original linear migration model with different mutation rates on most test functions. The model satisfies the diversity of the solutions, and better adapts to the nonlinear migration problem with improved search ability.
At present, scholars mainly focus on four perspectives of text, vocabulary, grammar and semantics in the field of clone code detection. However, few breakthroughs have been made in the effect of clone code detection for a long time. In view of this problem, a new method called Clone Code detection based on Image Similarity (CCIS) was proposed. Firstly, the source code was preprocessed by removing comments, white space, etc., from which a "clean" function fragment was able to be obtained, and the identifiers, keywords, etc. in the function were highlighted. Then the processed source code was converted into images and these images were normalized. Finally, Jaccard distance and perceptual Hash algorithm were used for detection, obtaining the clone code information from these images. In order to verify the validity of this method, six open source softwares were used to constitute the evaluation dataset for testing. The experimental results show that CCIS method can detect 100% type-1 clone code, 88% type-2 clone code and 60% type-3 clone code, which proves the good effect of CCIS method on clone code detection.